﻿[%^Main%]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/DinoRichCMS.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>VietSilver CMS</title>
<!-- InstanceEndEditable -->
<link href="~/../style/reset.css" rel="stylesheet" type="text/css" />
<link href="~/../style/960.css" rel="stylesheet" type="text/css" />
<link href="~/../style/global.css" rel="stylesheet" type="text/css" />
<link href="~/../style/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript" src="~/../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" language="javascript" src="~/../js/jquery-ui-1.8.4.custom.min.js"></script>
<script type="text/javascript" language="javascript" src="~/../js/jquery.validate.pack.js"></script>
<script type="text/javascript" language="javascript" src="~/../js/global.js"></script>
<!-- InstanceBeginEditable name="head" -->
<link href="~/../style/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript" src="~/../js/jquery.popupWindow.js"></script>
<script type="text/javascript" language="javascript" src="~/../js/jquery.lightbox-0.5.pack.js"></script>
<script type="text/javascript" language="javascript">
	$(document).ready(function(){
		$("#accordion").accordion("activate", 5);
		
		$('.selectImage').popupWindow({
				centerBrowser: 1,
				height: 530,
				width: 850,
				resizable: 1,
				windowName:'{{#SelectAFile}}'															
		});
		
		$('a.galleryImage').lightBox({fixedNavigation:true});
		
		$('#addNewGallery').click(function(){
			AddNewGalleryItem();
		});
	});
	
	function AddNewGalleryItem(){
		var imageURL = $('#galleryImage').val();
		var imageDesc = $('#galleryDescription').val();
		
		if (imageURL == ''){
			$('#galleryImage').focus();
			return;
		}
		
		AjaxResult('gallery&action=addnew', $('#editForm').serialize(), '{{#AddNewOK}}','{{#AddNewFail}}', true)
	}
	
	function LoadById(id){
		var webcmsPath = '{{webcmsPath}}';
		
		var imageURL = $('#imageURL-' + id).attr('src');
		var imageDesc = $('#imageDesc-' + id).html();
		
		$('#galleryImage').val(imageURL.replace('~/..', '{{webcmsPath}}'));
		$('#galleryDescription').val(imageDesc);
		
		$('#addNewGallery').unbind();
		$('#addNewGallery').click(function(){
			AjaxResult('gallery&action=edit&id=' + id, $('#editForm').serialize(), '{{#EditOK}}','{{#EditFail}}', true)
		});
		$('#addNewGallery').html('{{#Save}}');
	}
	
	function DeleteById(id){
		AjaxResult('gallery&action=delete', 'id=' + id + '&galleryAlbum={{albumID}}', '{{#DeleteOK}}','{{#DeleteFail}}', true)
	}
</script>
<!-- InstanceEndEditable -->
<!--[if IE 5]>
<style type="text/css"> 
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css"> 
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
</head>
<body class="twoColFixLtHdr">
<div id="user">
	{{#Hi}} <strong>{{fullName}}</strong> | <a href="javascript:void(0);" onclick="javascript:LogOut();">{{#Logout}}</a>[%^LanguageFlag1%][%^LanguageFlagItem%]<a href="javascript:void(0);" class="language" onclick="javascript:ChangeLanguage('{{langCode}}');" title="{{langName}}"><img src="~/../images/{{langCode}}.png" alt="{{langName}}" /></a>[%$LanguageFlagItem%][%$LanguageFlag1%]
</div>
<div id="container">
  <div id="header">
  	<p>{{#DRCMS}}</p>
  </div>
  <div id="sidebar1">
    <div id="accordion">
      <h3><a href="#"><img src="~/../images/news.png" /><em>{{#News}}</em></a></h3>
      <div>
        <ul>
          <li><a href="~/../news.aspx">{{#NewsList}}</a></li>
          <li><a href="~/../news.aspx?type=add">{{#AddNew}}</a></li>
          <li><a href="~/../category.aspx?filter=news">{{#ListCategory}}</a></li>
        </ul>
      </div>
      <h3><a href="#"><img src="~/../images/product.png" /><em>{{#Products}}</em></a></h3>
      <div>
        <ul>
          <li><a href="~/../product.aspx">{{#ProductList}}</a></li>
          <li><a href="~/../product.aspx?type=add">{{#AddNew}}</a></li>
          <li><a href="~/../category.aspx?filter=product">{{#ListCategory}}</a></li>
          <!--<li><a href="~/../vote.aspx">{{#Vote}}</a></li>--><li><a href="~/../order.aspx">{{#OrderLTC}}</a></li>
          <!--<li><a href="~/../customer.aspx">{{#Customer}}</a></li>-->
          <!--<li><a href="~/../regissale.aspx">{{#RegisSale}}</a></li>-->
          <!--<li><a href="~/../shipping.aspx">{{#Shipping}}</a></li>-->
        </ul>
      </div>
      <h3><a href="#"><img src="~/../images/user.png" /><em>{{#Admin}}</em></a></h3>
      <div>
        <ul>
          <li><a href="~/../user.aspx">{{#UserList}}</a></li>
          <li><a href="~/../user.aspx?type=add">{{#AddNew}}</a></li>
        </ul>
      </div>
      <h3><a href="#"><img src="~/../images/advertise.png" /><em>{{#Advertise}}</em></a></h3>
      <div>
        <ul>
          <li><a href="~/../advertise.aspx">{{#AdvertiseList}}</a></li>
          <li><a href="~/../advertise.aspx?type=add">{{#AddNew}}</a></li>
          <li><a href="~/../layout.aspx?type=advertise-position">{{#ConfigPosition}}</a></li>
        </ul>
      </div>
      <h3><a href="#"><img src="~/../images/position.png" /><em>{{#Position}}</em></a></h3>
      <div>
        <ul>
          <li><a href="~/../position.aspx">{{#PositionList}}</a></li>
          <li><a href="~/../position.aspx?type=add">{{#AddNew}}</a></li>
        </ul>
      </div>
      <h3><a href="#"><img src="~/../images/setting.png" /><em>{{#Other}}</em></a></h3>
      <div>
        <ul>
          <li><a href="~/../layout.aspx?type=category-position&categoryType=news-category">{{#Layout}}</a></li>
          <li><a href="~/../setting.aspx">{{#Settings}}</a></li><li><a href="~/../roomgallery.aspx?type=edit&id=0">{{#Map}}</a></li><li><a href="~/../roomgallery.aspx?type=add">{{#NewMap}}</a></li>
          <li><a href="~/../roomgallery.aspx">{{#Gallery}}</a></li><li><a href="~/../roomgallery.aspx?type=add">{{#AddNew}}</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div id="mainContent">
  	<!-- InstanceBeginEditable name="Content" -->[%^Content%]
    <h3>&raquo; {{#Manage}} {{#Gallery_LC}}</h3>[%^EditForm%]
    <div id="errorAjax" class="result">
      <p><img src="~/../images/ok.png" /><span id="result-message"></span></p>
    </div>
    <div id="edit">
    	<form id="editForm" action="" method="post">[%^AddAndEdit%]
      	<input type="hidden" name="galleryAlbum" value="{{albumID}}" />
        <p><label>{{#Image}}:</label><input type="text" id="galleryImage" name="galleryImage" value="{{galleryImage}}" />&nbsp;<a class="button selectImage" href="~/../file.aspx?type=image&return=galleryImage">{{#Browse}}</a>&nbsp;<a href="{{webcmsPath}}{{galleryImage}}" class="button galleryImage" id="previewImage">{{#View}}</a></p>
        <p><label class="aligntop">{{#Description}}:</label><textarea id="galleryDescription" name="galleryDescription" rows="4">{{galleryDescription}}</textarea></p>
        <p><label>&nbsp;</label><a href="javascript:void(0);" id="addNewGallery" class="button">{{#Add}}</a></p>[%$AddAndEdit%][%^Gallery%]
        <div class="boxContainer clearfix">
        	<ul class="gallery">[%^GalleryItem%]
          	<li>
            	<a href="~/..{{imageURL}}" class="galleryImage"><img class="gallery" id="imageURL-{{imageID}}" src="~/..{{imageURL}}" alt="{{#Image}}" /></a>
              <p id="imageDesc-{{imageID}}">{{imageDescription}}</p>
              <p><a href="javascript:void(0);" onclick="DeleteById('{{imageID}}');">{{#Delete}}</a>| <a href="javascript:void(0);" onclick="LoadById('{{imageID}}');">{{#Edit}}</a></p>
            </li>[%$GalleryItem%]
          </ul>
          [%^Paging%]
          <ul id="galleryPaging" class="paging">
            <li class="info">{{#Page}} <strong>{{currentPage}}</strong> / {{totalPage}} ({{totalRecord}} {{#Record}})</li>[%^PagingPrevious%]
            <li><a href="facilities.aspx?page=1{{searchInfo}}">&laquo;</a></li>
            <li><a href="facilities.aspx?page={{pageIndexPrevious}}{{searchInfo}}">&lsaquo;</a></li>[%$PagingPrevious%][%^PagingItem%]
            <li><a href="facilities.aspx?page={{pageIndex}}{{searchInfo}}"{{currentPageStyle}}>{{pageIndex}}</a></li>[%$PagingItem%][%^PagingNext%]
            <li><a href="facilities.aspx?page={{pageIndexNext}}{{searchInfo}}">&rsaquo;</a></li>
            <li><a href="facilities.aspx?page={{totalPage}}{{searchInfo}}">&raquo;</a></li>[%$PagingNext%]
          </ul>[%$Paging%]         
        </div>[%$Gallery%]
      </form>
    </div>[%$EditForm%]
		[%$Content%]<!-- InstanceEndEditable -->
  </div>
  <br class="clearfloat" />
  <div id="footer" class="clearfix">
  	<p class="fleft">{{#CopyrightText}}</p>
    <p class="fright">{{#BetterViewing}}</p>
  </div>
</div>
</body>
{{errorCode}}
<!-- InstanceEnd --></html>[%$Main%]